#ifndef MODBUSWIG_H
#define MODBUSWIG_H

#include <QWidget>
#include <QJsonDocument>
#include <QJsonParseError>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonValue>
#include <QFile>
#include <QDebug>
#include "mqtthandler.h"
#include "globalval.h"
#include <QLabel>
#include <QDial>
#include <QPainter>
#include <QTimer>   // 定时器类
#include <QDateTime>
namespace Ui {
class ModbusWig;
}

class ModbusWig : public QWidget
{
    Q_OBJECT

public:
    explicit ModbusWig(QWidget *parent = 0);
    ~ModbusWig();

private:
    Ui::ModbusWig *ui;
    int kongtiao=0;
    QTimer *timer;  // 定时器对象
//    void drawScaleNum(QPainter *painter);

private slots:
    void dataUpSlot(QByteArray);//接收数据并显示
    void on_pushButton_clicked();
//    void on_pushButton_2_clicked();
    void on_dial_actionTriggered(int action);
    void dialValueChanged(int);
    void dialyValueChanged(int);
    void pushButton_3_shuaxin(); //刷新
    void timeoutSlot();
};

#endif // MODBUSWIG_H
